//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension LookoutEquipment {
    // MARK: Enums

    public enum DataUploadFrequency: String, CustomStringConvertible, Codable, _SotoSendable {
        case pt10m = "PT10M"
        case pt15m = "PT15M"
        case pt1h = "PT1H"
        case pt30m = "PT30M"
        case pt5m = "PT5M"
        public var description: String { return self.rawValue }
    }

    public enum DatasetStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "ACTIVE"
        case created = "CREATED"
        case ingestionInProgress = "INGESTION_IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum InferenceExecutionStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum InferenceSchedulerStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case pending = "PENDING"
        case running = "RUNNING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        public var description: String { return self.rawValue }
    }

    public enum IngestionJobStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum LabelRating: String, CustomStringConvertible, Codable, _SotoSendable {
        case anomaly = "ANOMALY"
        case neutral = "NEUTRAL"
        case noAnomaly = "NO_ANOMALY"
        public var description: String { return self.rawValue }
    }

    public enum LatestInferenceResult: String, CustomStringConvertible, Codable, _SotoSendable {
        case anomalous = "ANOMALOUS"
        case normal = "NORMAL"
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum Monotonicity: String, CustomStringConvertible, Codable, _SotoSendable {
        case `static` = "STATIC"
        case decreasing = "DECREASING"
        case increasing = "INCREASING"
        public var description: String { return self.rawValue }
    }

    public enum StatisticalIssueStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case noIssueDetected = "NO_ISSUE_DETECTED"
        case potentialIssueDetected = "POTENTIAL_ISSUE_DETECTED"
        public var description: String { return self.rawValue }
    }

    public enum TargetSamplingRate: String, CustomStringConvertible, Codable, _SotoSendable {
        case pt10m = "PT10M"
        case pt10s = "PT10S"
        case pt15m = "PT15M"
        case pt15s = "PT15S"
        case pt1h = "PT1H"
        case pt1m = "PT1M"
        case pt1s = "PT1S"
        case pt30m = "PT30M"
        case pt30s = "PT30S"
        case pt5m = "PT5M"
        case pt5s = "PT5S"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct CategoricalValues: AWSDecodableShape {
        ///  Indicates the number of categories in the data.
        public let numberOfCategory: Int?
        ///  Indicates whether there is a potential data issue related to categorical values.
        public let status: StatisticalIssueStatus

        public init(numberOfCategory: Int? = nil, status: StatisticalIssueStatus) {
            self.numberOfCategory = numberOfCategory
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfCategory = "NumberOfCategory"
            case status = "Status"
        }
    }

    public struct CountPercent: AWSDecodableShape {
        ///  Indicates the count of occurences of the given statistic.
        public let count: Int
        ///  Indicates the percentage of occurances of the given statistic.
        public let percentage: Float

        public init(count: Int, percentage: Float) {
            self.count = count
            self.percentage = percentage
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
            case percentage = "Percentage"
        }
    }

    public struct CreateDatasetRequest: AWSEncodableShape {
        ///  A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
        public let clientToken: String
        /// The name of the dataset being created.
        public let datasetName: String
        /// A JSON description of the data that is in each time series dataset, including names, column names, and data types.
        public let datasetSchema: DatasetSchema?
        /// Provides the identifier of the KMS key used to encrypt dataset data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        /// Any tags associated with the ingested data described in the dataset.
        public let tags: [Tag]?

        public init(clientToken: String = CreateDatasetRequest.idempotencyToken(), datasetName: String, datasetSchema: DatasetSchema? = nil, serverSideKmsKeyId: String? = nil, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.datasetName = datasetName
            self.datasetSchema = datasetSchema
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.datasetSchema?.validate(name: "\(name).datasetSchema")
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, max: 2048)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, min: 1)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case datasetName = "DatasetName"
            case datasetSchema = "DatasetSchema"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case tags = "Tags"
        }
    }

    public struct CreateDatasetResponse: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the dataset being created.
        public let datasetArn: String?
        /// The name of the dataset being created.
        public let datasetName: String?
        /// Indicates the status of the CreateDataset operation.
        public let status: DatasetStatus?

        public init(datasetArn: String? = nil, datasetName: String? = nil, status: DatasetStatus? = nil) {
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case status = "Status"
        }
    }

    public struct CreateInferenceSchedulerRequest: AWSEncodableShape {
        ///  A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
        public let clientToken: String
        /// The interval (in minutes) of planned delay at the start of each inference segment. For example, if inference is set to run every ten minutes, the delay is set to five minutes and the time is 09:08. The inference scheduler will wake up at the configured interval (which, without a delay configured, would be 09:10) plus the additional five minute delay time (so 09:15) to check your Amazon S3 bucket. The delay provides a buffer for you to upload data at the same frequency, so that you don't have to stop and restart the scheduler when uploading new data. For more information, see Understanding the inference process.
        public let dataDelayOffsetInMinutes: Int64?
        /// Specifies configuration information for the input data for the inference scheduler, including delimiter, format, and dataset location.
        public let dataInputConfiguration: InferenceInputConfiguration
        /// Specifies configuration information for the output results for the inference scheduler, including the S3 location for the output.
        public let dataOutputConfiguration: InferenceOutputConfiguration
        ///  How often data is uploaded to the source Amazon S3 bucket for the input data. The value chosen is the length of time between data uploads. For instance, if you select 5 minutes, Amazon Lookout for Equipment will upload the real-time data to the source bucket once every 5 minutes. This frequency also determines how often Amazon Lookout for Equipment runs inference on your data. For more information, see Understanding the inference process.
        public let dataUploadFrequency: DataUploadFrequency
        /// The name of the inference scheduler being created.
        public let inferenceSchedulerName: String
        /// The name of the previously trained ML model being used to create the inference scheduler.
        public let modelName: String
        /// The Amazon Resource Name (ARN) of a role with permission to access the data source being used for the inference.
        public let roleArn: String
        /// Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        /// Any tags associated with the inference scheduler.
        public let tags: [Tag]?

        public init(clientToken: String = CreateInferenceSchedulerRequest.idempotencyToken(), dataDelayOffsetInMinutes: Int64? = nil, dataInputConfiguration: InferenceInputConfiguration, dataOutputConfiguration: InferenceOutputConfiguration, dataUploadFrequency: DataUploadFrequency, inferenceSchedulerName: String, modelName: String, roleArn: String, serverSideKmsKeyId: String? = nil, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.dataDelayOffsetInMinutes = dataDelayOffsetInMinutes
            self.dataInputConfiguration = dataInputConfiguration
            self.dataOutputConfiguration = dataOutputConfiguration
            self.dataUploadFrequency = dataUploadFrequency
            self.inferenceSchedulerName = inferenceSchedulerName
            self.modelName = modelName
            self.roleArn = roleArn
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.validate(self.dataDelayOffsetInMinutes, name: "dataDelayOffsetInMinutes", parent: name, max: 60)
            try self.validate(self.dataDelayOffsetInMinutes, name: "dataDelayOffsetInMinutes", parent: name, min: 0)
            try self.dataInputConfiguration.validate(name: "\(name).dataInputConfiguration")
            try self.dataOutputConfiguration.validate(name: "\(name).dataOutputConfiguration")
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, max: 2048)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, min: 1)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case dataDelayOffsetInMinutes = "DataDelayOffsetInMinutes"
            case dataInputConfiguration = "DataInputConfiguration"
            case dataOutputConfiguration = "DataOutputConfiguration"
            case dataUploadFrequency = "DataUploadFrequency"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case modelName = "ModelName"
            case roleArn = "RoleArn"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case tags = "Tags"
        }
    }

    public struct CreateInferenceSchedulerResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the inference scheduler being created.
        public let inferenceSchedulerArn: String?
        /// The name of inference scheduler being created.
        public let inferenceSchedulerName: String?
        /// Indicates the status of the CreateInferenceScheduler operation.
        public let status: InferenceSchedulerStatus?

        public init(inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, status: InferenceSchedulerStatus? = nil) {
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case status = "Status"
        }
    }

    public struct CreateLabelGroupRequest: AWSEncodableShape {
        /// A unique identifier for the request to create a label group. If you do not set the client request token, Lookout for Equipment generates one.
        public let clientToken: String
        /// The acceptable fault codes (indicating the type of anomaly associated with the label) that can be used with this label group. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let faultCodes: [String]?
        /// Names a group of labels. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let labelGroupName: String
        /// Tags that provide metadata about the label group you are creating.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let tags: [Tag]?

        public init(clientToken: String = CreateLabelGroupRequest.idempotencyToken(), faultCodes: [String]? = nil, labelGroupName: String, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.faultCodes = faultCodes
            self.labelGroupName = labelGroupName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.faultCodes?.forEach {
                try validate($0, name: "faultCodes[]", parent: name, max: 100)
                try validate($0, name: "faultCodes[]", parent: name, min: 1)
                try validate($0, name: "faultCodes[]", parent: name, pattern: "^[\\P{M}\\p{M}]{1,100}$")
            }
            try self.validate(self.faultCodes, name: "faultCodes", parent: name, max: 50)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case faultCodes = "FaultCodes"
            case labelGroupName = "LabelGroupName"
            case tags = "Tags"
        }
    }

    public struct CreateLabelGroupResponse: AWSDecodableShape {
        /// The ARN of the label group that you have created.
        public let labelGroupArn: String?
        /// The name of the label group that you have created. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let labelGroupName: String?

        public init(labelGroupArn: String? = nil, labelGroupName: String? = nil) {
            self.labelGroupArn = labelGroupArn
            self.labelGroupName = labelGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupArn = "LabelGroupArn"
            case labelGroupName = "LabelGroupName"
        }
    }

    public struct CreateLabelRequest: AWSEncodableShape {
        /// A unique identifier for the request to create a label. If you do not set the client request token, Lookout for Equipment generates one.
        public let clientToken: String
        /// The end time of the labeled event.
        public let endTime: Date
        /// Indicates that a label pertains to a particular piece of equipment.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let equipment: String?
        /// Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of the label group. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let faultCode: String?
        /// The name of a group of labels.  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let labelGroupName: String
        /// Metadata providing additional information about the label.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let notes: String?
        /// Indicates whether a labeled event represents an anomaly.
        public let rating: LabelRating
        /// The start time of the labeled event.
        public let startTime: Date

        public init(clientToken: String = CreateLabelRequest.idempotencyToken(), endTime: Date, equipment: String? = nil, faultCode: String? = nil, labelGroupName: String, notes: String? = nil, rating: LabelRating, startTime: Date) {
            self.clientToken = clientToken
            self.endTime = endTime
            self.equipment = equipment
            self.faultCode = faultCode
            self.labelGroupName = labelGroupName
            self.notes = notes
            self.rating = rating
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.validate(self.equipment, name: "equipment", parent: name, max: 200)
            try self.validate(self.equipment, name: "equipment", parent: name, min: 1)
            try self.validate(self.equipment, name: "equipment", parent: name, pattern: "^[\\P{M}\\p{M}]{1,200}$")
            try self.validate(self.faultCode, name: "faultCode", parent: name, max: 100)
            try self.validate(self.faultCode, name: "faultCode", parent: name, min: 1)
            try self.validate(self.faultCode, name: "faultCode", parent: name, pattern: "^[\\P{M}\\p{M}]{1,100}$")
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.notes, name: "notes", parent: name, max: 2560)
            try self.validate(self.notes, name: "notes", parent: name, min: 1)
            try self.validate(self.notes, name: "notes", parent: name, pattern: "^[\\P{M}\\p{M}]{1,2560}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case endTime = "EndTime"
            case equipment = "Equipment"
            case faultCode = "FaultCode"
            case labelGroupName = "LabelGroupName"
            case notes = "Notes"
            case rating = "Rating"
            case startTime = "StartTime"
        }
    }

    public struct CreateLabelResponse: AWSDecodableShape {
        /// The ID of the label that you have created.
        public let labelId: String?

        public init(labelId: String? = nil) {
            self.labelId = labelId
        }

        private enum CodingKeys: String, CodingKey {
            case labelId = "LabelId"
        }
    }

    public struct CreateModelRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
        public let clientToken: String
        /// The configuration is the TargetSamplingRate, which is the sampling rate of the data after post processing by Amazon Lookout for Equipment. For example, if you provide data that has been collected at a 1 second level and you want the system to resample the data at a 1 minute rate before training, the TargetSamplingRate is 1 minute. When providing a value for the TargetSamplingRate, you must attach the prefix "PT" to the rate you want. The value for a 1 second rate is therefore PT1S, the value for a 15 minute rate is PT15M, and the value for a 1 hour rate is PT1H
        public let dataPreProcessingConfiguration: DataPreProcessingConfiguration?
        /// The name of the dataset for the ML model being created.
        public let datasetName: String
        /// The data schema for the ML model being created.
        public let datasetSchema: DatasetSchema?
        ///  Indicates the time reference in the dataset that should be used to end the subset of evaluation data for the ML model.
        public let evaluationDataEndTime: Date?
        /// Indicates the time reference in the dataset that should be used to begin the subset of evaluation data for the ML model.
        public let evaluationDataStartTime: Date?
        /// The input configuration for the labels being used for the ML model that's being created.
        public let labelsInputConfiguration: LabelsInputConfiguration?
        /// The name for the ML model to be created.
        public let modelName: String
        /// Indicates that the asset associated with this sensor has been shut off. As long as this condition is met, Lookout for Equipment will not use data from this asset for training, evaluation, or inference.
        public let offCondition: String?
        ///  The Amazon Resource Name (ARN) of a role with permission to access the data source being used to create the ML model.
        public let roleArn: String?
        /// Provides the identifier of the KMS key used to encrypt model data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        ///  Any tags associated with the ML model being created.
        public let tags: [Tag]?
        /// Indicates the time reference in the dataset that should be used to end the subset of training data for the ML model.
        public let trainingDataEndTime: Date?
        /// Indicates the time reference in the dataset that should be used to begin the subset of training data for the ML model.
        public let trainingDataStartTime: Date?

        public init(clientToken: String = CreateModelRequest.idempotencyToken(), dataPreProcessingConfiguration: DataPreProcessingConfiguration? = nil, datasetName: String, datasetSchema: DatasetSchema? = nil, evaluationDataEndTime: Date? = nil, evaluationDataStartTime: Date? = nil, labelsInputConfiguration: LabelsInputConfiguration? = nil, modelName: String, offCondition: String? = nil, roleArn: String? = nil, serverSideKmsKeyId: String? = nil, tags: [Tag]? = nil, trainingDataEndTime: Date? = nil, trainingDataStartTime: Date? = nil) {
            self.clientToken = clientToken
            self.dataPreProcessingConfiguration = dataPreProcessingConfiguration
            self.datasetName = datasetName
            self.datasetSchema = datasetSchema
            self.evaluationDataEndTime = evaluationDataEndTime
            self.evaluationDataStartTime = evaluationDataStartTime
            self.labelsInputConfiguration = labelsInputConfiguration
            self.modelName = modelName
            self.offCondition = offCondition
            self.roleArn = roleArn
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.tags = tags
            self.trainingDataEndTime = trainingDataEndTime
            self.trainingDataStartTime = trainingDataStartTime
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.datasetSchema?.validate(name: "\(name).datasetSchema")
            try self.labelsInputConfiguration?.validate(name: "\(name).labelsInputConfiguration")
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.offCondition, name: "offCondition", parent: name, max: 2048)
            try self.validate(self.offCondition, name: "offCondition", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, max: 2048)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, min: 1)
            try self.validate(self.serverSideKmsKeyId, name: "serverSideKmsKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case dataPreProcessingConfiguration = "DataPreProcessingConfiguration"
            case datasetName = "DatasetName"
            case datasetSchema = "DatasetSchema"
            case evaluationDataEndTime = "EvaluationDataEndTime"
            case evaluationDataStartTime = "EvaluationDataStartTime"
            case labelsInputConfiguration = "LabelsInputConfiguration"
            case modelName = "ModelName"
            case offCondition = "OffCondition"
            case roleArn = "RoleArn"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case tags = "Tags"
            case trainingDataEndTime = "TrainingDataEndTime"
            case trainingDataStartTime = "TrainingDataStartTime"
        }
    }

    public struct CreateModelResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the model being created.
        public let modelArn: String?
        /// Indicates the status of the CreateModel operation.
        public let status: ModelStatus?

        public init(modelArn: String? = nil, status: ModelStatus? = nil) {
            self.modelArn = modelArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case modelArn = "ModelArn"
            case status = "Status"
        }
    }

    public struct DataIngestionJobSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the dataset used in the data ingestion job.
        public let datasetArn: String?
        /// The name of the dataset used for the data ingestion job.
        public let datasetName: String?
        ///  Specifies information for the input data for the data inference job, including data Amazon S3 location parameters.
        public let ingestionInputConfiguration: IngestionInputConfiguration?
        /// Indicates the job ID of the data ingestion job.
        public let jobId: String?
        /// Indicates the status of the data ingestion job.
        public let status: IngestionJobStatus?

        public init(datasetArn: String? = nil, datasetName: String? = nil, ingestionInputConfiguration: IngestionInputConfiguration? = nil, jobId: String? = nil, status: IngestionJobStatus? = nil) {
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.ingestionInputConfiguration = ingestionInputConfiguration
            self.jobId = jobId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case ingestionInputConfiguration = "IngestionInputConfiguration"
            case jobId = "JobId"
            case status = "Status"
        }
    }

    public struct DataPreProcessingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The sampling rate of the data after post processing by Amazon Lookout for Equipment. For example, if you provide data that has been collected at a 1 second level and you want the system to resample the data at a 1 minute rate before training, the TargetSamplingRate is 1 minute. When providing a value for the TargetSamplingRate, you must attach the prefix "PT" to the rate you want. The value for a 1 second rate is therefore PT1S, the value for a 15 minute rate is PT15M, and the value for a 1 hour rate is PT1H
        public let targetSamplingRate: TargetSamplingRate?

        public init(targetSamplingRate: TargetSamplingRate? = nil) {
            self.targetSamplingRate = targetSamplingRate
        }

        private enum CodingKeys: String, CodingKey {
            case targetSamplingRate = "TargetSamplingRate"
        }
    }

    public struct DataQualitySummary: AWSDecodableShape {
        ///  Parameter that gives information about duplicate timestamps in the input data.
        public let duplicateTimestamps: DuplicateTimestamps
        ///  Parameter that gives information about insufficient data for sensors in the dataset. This includes information about those sensors that have complete data missing and those with a short date range.
        public let insufficientSensorData: InsufficientSensorData
        ///  Parameter that gives information about data that is invalid over all the sensors in the input data.
        public let invalidSensorData: InvalidSensorData
        ///  Parameter that gives information about data that is missing over all the sensors in the input data.
        public let missingSensorData: MissingSensorData
        ///  Parameter that gives information about unsupported timestamps in the input data.
        public let unsupportedTimestamps: UnsupportedTimestamps

        public init(duplicateTimestamps: DuplicateTimestamps, insufficientSensorData: InsufficientSensorData, invalidSensorData: InvalidSensorData, missingSensorData: MissingSensorData, unsupportedTimestamps: UnsupportedTimestamps) {
            self.duplicateTimestamps = duplicateTimestamps
            self.insufficientSensorData = insufficientSensorData
            self.invalidSensorData = invalidSensorData
            self.missingSensorData = missingSensorData
            self.unsupportedTimestamps = unsupportedTimestamps
        }

        private enum CodingKeys: String, CodingKey {
            case duplicateTimestamps = "DuplicateTimestamps"
            case insufficientSensorData = "InsufficientSensorData"
            case invalidSensorData = "InvalidSensorData"
            case missingSensorData = "MissingSensorData"
            case unsupportedTimestamps = "UnsupportedTimestamps"
        }
    }

    public struct DatasetSchema: AWSEncodableShape {
        ///
        public let inlineDataSchema: String?

        public init(inlineDataSchema: String? = nil) {
            self.inlineDataSchema = inlineDataSchema
        }

        public func validate(name: String) throws {
            try self.validate(self.inlineDataSchema, name: "inlineDataSchema", parent: name, max: 1_000_000)
            try self.validate(self.inlineDataSchema, name: "inlineDataSchema", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case inlineDataSchema = "InlineDataSchema"
        }
    }

    public struct DatasetSummary: AWSDecodableShape {
        /// The time at which the dataset was created in Amazon Lookout for Equipment.
        public let createdAt: Date?
        /// The Amazon Resource Name (ARN) of the specified dataset.
        public let datasetArn: String?
        /// The name of the dataset.
        public let datasetName: String?
        /// Indicates the status of the dataset.
        public let status: DatasetStatus?

        public init(createdAt: Date? = nil, datasetArn: String? = nil, datasetName: String? = nil, status: DatasetStatus? = nil) {
            self.createdAt = createdAt
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case status = "Status"
        }
    }

    public struct DeleteDatasetRequest: AWSEncodableShape {
        /// The name of the dataset to be deleted.
        public let datasetName: String

        public init(datasetName: String) {
            self.datasetName = datasetName
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetName = "DatasetName"
        }
    }

    public struct DeleteInferenceSchedulerRequest: AWSEncodableShape {
        /// The name of the inference scheduler to be deleted.
        public let inferenceSchedulerName: String

        public init(inferenceSchedulerName: String) {
            self.inferenceSchedulerName = inferenceSchedulerName
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerName = "InferenceSchedulerName"
        }
    }

    public struct DeleteLabelGroupRequest: AWSEncodableShape {
        /// The name of the label group that you want to delete. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let labelGroupName: String

        public init(labelGroupName: String) {
            self.labelGroupName = labelGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupName = "LabelGroupName"
        }
    }

    public struct DeleteLabelRequest: AWSEncodableShape {
        /// The name of the label group that contains the label that you want to delete. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let labelGroupName: String
        /// The ID of the label that you want to delete.
        public let labelId: String

        public init(labelGroupName: String, labelId: String) {
            self.labelGroupName = labelGroupName
            self.labelId = labelId
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.labelId, name: "labelId", parent: name, max: 32)
            try self.validate(self.labelId, name: "labelId", parent: name, pattern: "^[A-Fa-f0-9]{0,32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupName = "LabelGroupName"
            case labelId = "LabelId"
        }
    }

    public struct DeleteModelRequest: AWSEncodableShape {
        /// The name of the ML model to be deleted.
        public let modelName: String

        public init(modelName: String) {
            self.modelName = modelName
        }

        public func validate(name: String) throws {
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case modelName = "ModelName"
        }
    }

    public struct DescribeDataIngestionJobRequest: AWSEncodableShape {
        /// The job ID of the data ingestion job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[A-Fa-f0-9]{0,32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeDataIngestionJobResponse: AWSDecodableShape {
        /// The time at which the data ingestion job was created.
        public let createdAt: Date?
        ///  Indicates the latest timestamp corresponding to data that was successfully ingested during this specific ingestion job.
        public let dataEndTime: Date?
        ///  Gives statistics about a completed ingestion job. These statistics primarily relate to quantifying incorrect data such as MissingCompleteSensorData, MissingSensorData, UnsupportedDateFormats, InsufficientSensorData, and DuplicateTimeStamps.
        public let dataQualitySummary: DataQualitySummary?
        /// The Amazon Resource Name (ARN) of the dataset being used in the data ingestion job.
        public let datasetArn: String?
        ///  Indicates the earliest timestamp corresponding to data that was successfully ingested during this specific ingestion job.
        public let dataStartTime: Date?
        /// Specifies the reason for failure when a data ingestion job has failed.
        public let failedReason: String?
        ///  Indicates the size of the ingested dataset.
        public let ingestedDataSize: Int64?
        public let ingestedFilesSummary: IngestedFilesSummary?
        /// Specifies the S3 location configuration for the data input for the data ingestion job.
        public let ingestionInputConfiguration: IngestionInputConfiguration?
        /// Indicates the job ID of the data ingestion job.
        public let jobId: String?
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access the data source being ingested.
        public let roleArn: String?
        /// Indicates the status of the DataIngestionJob operation.
        public let status: IngestionJobStatus?
        ///  Provides details about status of the ingestion job that is currently in progress.
        public let statusDetail: String?

        public init(createdAt: Date? = nil, dataEndTime: Date? = nil, dataQualitySummary: DataQualitySummary? = nil, datasetArn: String? = nil, dataStartTime: Date? = nil, failedReason: String? = nil, ingestedDataSize: Int64? = nil, ingestedFilesSummary: IngestedFilesSummary? = nil, ingestionInputConfiguration: IngestionInputConfiguration? = nil, jobId: String? = nil, roleArn: String? = nil, status: IngestionJobStatus? = nil, statusDetail: String? = nil) {
            self.createdAt = createdAt
            self.dataEndTime = dataEndTime
            self.dataQualitySummary = dataQualitySummary
            self.datasetArn = datasetArn
            self.dataStartTime = dataStartTime
            self.failedReason = failedReason
            self.ingestedDataSize = ingestedDataSize
            self.ingestedFilesSummary = ingestedFilesSummary
            self.ingestionInputConfiguration = ingestionInputConfiguration
            self.jobId = jobId
            self.roleArn = roleArn
            self.status = status
            self.statusDetail = statusDetail
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case dataEndTime = "DataEndTime"
            case dataQualitySummary = "DataQualitySummary"
            case datasetArn = "DatasetArn"
            case dataStartTime = "DataStartTime"
            case failedReason = "FailedReason"
            case ingestedDataSize = "IngestedDataSize"
            case ingestedFilesSummary = "IngestedFilesSummary"
            case ingestionInputConfiguration = "IngestionInputConfiguration"
            case jobId = "JobId"
            case roleArn = "RoleArn"
            case status = "Status"
            case statusDetail = "StatusDetail"
        }
    }

    public struct DescribeDatasetRequest: AWSEncodableShape {
        /// The name of the dataset to be described.
        public let datasetName: String

        public init(datasetName: String) {
            self.datasetName = datasetName
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetName = "DatasetName"
        }
    }

    public struct DescribeDatasetResponse: AWSDecodableShape {
        /// Specifies the time the dataset was created in Lookout for Equipment.
        public let createdAt: Date?
        ///  Indicates the latest timestamp corresponding to data that was successfully ingested during the most recent ingestion of this particular dataset.
        public let dataEndTime: Date?
        ///  Gives statistics associated with the given dataset for the latest successful associated ingestion job id. These statistics primarily relate to quantifying incorrect data such as MissingCompleteSensorData, MissingSensorData, UnsupportedDateFormats, InsufficientSensorData, and DuplicateTimeStamps.
        public let dataQualitySummary: DataQualitySummary?
        /// The Amazon Resource Name (ARN) of the dataset being described.
        public let datasetArn: String?
        /// The name of the dataset being described.
        public let datasetName: String?
        ///  Indicates the earliest timestamp corresponding to data that was successfully ingested during the most recent ingestion of this particular dataset.
        public let dataStartTime: Date?
        ///  IngestedFilesSummary associated with the given dataset for the latest successful associated ingestion job id.
        public let ingestedFilesSummary: IngestedFilesSummary?
        /// Specifies the S3 location configuration for the data input for the data ingestion job.
        public let ingestionInputConfiguration: IngestionInputConfiguration?
        /// Specifies the time the dataset was last updated, if it was.
        public let lastUpdatedAt: Date?
        ///  The Amazon Resource Name (ARN) of the IAM role that you are using for this the data ingestion job.
        public let roleArn: String?
        /// A JSON description of the data that is in each time series dataset, including names, column names, and data types.
        public let schema: String?
        /// Provides the identifier of the KMS key used to encrypt dataset data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        /// Indicates the status of the dataset.
        public let status: DatasetStatus?

        public init(createdAt: Date? = nil, dataEndTime: Date? = nil, dataQualitySummary: DataQualitySummary? = nil, datasetArn: String? = nil, datasetName: String? = nil, dataStartTime: Date? = nil, ingestedFilesSummary: IngestedFilesSummary? = nil, ingestionInputConfiguration: IngestionInputConfiguration? = nil, lastUpdatedAt: Date? = nil, roleArn: String? = nil, schema: String? = nil, serverSideKmsKeyId: String? = nil, status: DatasetStatus? = nil) {
            self.createdAt = createdAt
            self.dataEndTime = dataEndTime
            self.dataQualitySummary = dataQualitySummary
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.dataStartTime = dataStartTime
            self.ingestedFilesSummary = ingestedFilesSummary
            self.ingestionInputConfiguration = ingestionInputConfiguration
            self.lastUpdatedAt = lastUpdatedAt
            self.roleArn = roleArn
            self.schema = schema
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case dataEndTime = "DataEndTime"
            case dataQualitySummary = "DataQualitySummary"
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case dataStartTime = "DataStartTime"
            case ingestedFilesSummary = "IngestedFilesSummary"
            case ingestionInputConfiguration = "IngestionInputConfiguration"
            case lastUpdatedAt = "LastUpdatedAt"
            case roleArn = "RoleArn"
            case schema = "Schema"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case status = "Status"
        }
    }

    public struct DescribeInferenceSchedulerRequest: AWSEncodableShape {
        /// The name of the inference scheduler being described.
        public let inferenceSchedulerName: String

        public init(inferenceSchedulerName: String) {
            self.inferenceSchedulerName = inferenceSchedulerName
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerName = "InferenceSchedulerName"
        }
    }

    public struct DescribeInferenceSchedulerResponse: AWSDecodableShape {
        /// Specifies the time at which the inference scheduler was created.
        public let createdAt: Date?
        ///  A period of time (in minutes) by which inference on the data is delayed after the data starts. For instance, if you select an offset delay time of five minutes, inference will not begin on the data until the first data measurement after the five minute mark. For example, if five minutes is selected, the inference scheduler will wake up at the configured frequency with the additional five minute delay time to check the customer S3 bucket. The customer can upload data at the same frequency and they don't need to stop and restart the scheduler when uploading new data.
        public let dataDelayOffsetInMinutes: Int64?
        ///  Specifies configuration information for the input data for the inference scheduler, including delimiter, format, and dataset location.
        public let dataInputConfiguration: InferenceInputConfiguration?
        ///  Specifies information for the output results for the inference scheduler, including the output S3 location.
        public let dataOutputConfiguration: InferenceOutputConfiguration?
        /// Specifies how often data is uploaded to the source S3 bucket for the input data. This value is the length of time between data uploads. For instance, if you select 5 minutes, Amazon Lookout for Equipment will upload the real-time data to the source bucket once every 5 minutes. This frequency also determines how often Amazon Lookout for Equipment starts a scheduled inference on your data. In this example, it starts once every 5 minutes.
        public let dataUploadFrequency: DataUploadFrequency?
        /// The Amazon Resource Name (ARN) of the inference scheduler being described.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler being described.
        public let inferenceSchedulerName: String?
        /// Indicates whether the latest execution for the inference scheduler was Anomalous (anomalous events found) or Normal (no anomalous events found).
        public let latestInferenceResult: LatestInferenceResult?
        /// The Amazon Resource Name (ARN) of the ML model of the inference scheduler being described.
        public let modelArn: String?
        /// The name of the ML model of the inference scheduler being described.
        public let modelName: String?
        ///  The Amazon Resource Name (ARN) of a role with permission to access the data source for the inference scheduler being described.
        public let roleArn: String?
        /// Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        /// Indicates the status of the inference scheduler.
        public let status: InferenceSchedulerStatus?
        /// Specifies the time at which the inference scheduler was last updated, if it was.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, dataDelayOffsetInMinutes: Int64? = nil, dataInputConfiguration: InferenceInputConfiguration? = nil, dataOutputConfiguration: InferenceOutputConfiguration? = nil, dataUploadFrequency: DataUploadFrequency? = nil, inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, latestInferenceResult: LatestInferenceResult? = nil, modelArn: String? = nil, modelName: String? = nil, roleArn: String? = nil, serverSideKmsKeyId: String? = nil, status: InferenceSchedulerStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.dataDelayOffsetInMinutes = dataDelayOffsetInMinutes
            self.dataInputConfiguration = dataInputConfiguration
            self.dataOutputConfiguration = dataOutputConfiguration
            self.dataUploadFrequency = dataUploadFrequency
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.latestInferenceResult = latestInferenceResult
            self.modelArn = modelArn
            self.modelName = modelName
            self.roleArn = roleArn
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case dataDelayOffsetInMinutes = "DataDelayOffsetInMinutes"
            case dataInputConfiguration = "DataInputConfiguration"
            case dataOutputConfiguration = "DataOutputConfiguration"
            case dataUploadFrequency = "DataUploadFrequency"
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case latestInferenceResult = "LatestInferenceResult"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case roleArn = "RoleArn"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeLabelGroupRequest: AWSEncodableShape {
        /// Returns the name of the label group.
        public let labelGroupName: String

        public init(labelGroupName: String) {
            self.labelGroupName = labelGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupName = "LabelGroupName"
        }
    }

    public struct DescribeLabelGroupResponse: AWSDecodableShape {
        /// The time at which the label group was created.
        public let createdAt: Date?
        /// Codes indicating the type of anomaly associated with the labels in the lagbel group.
        public let faultCodes: [String]?
        /// The ARN of the label group.
        public let labelGroupArn: String?
        /// The name of the label group.
        public let labelGroupName: String?
        /// The time at which the label group was updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, faultCodes: [String]? = nil, labelGroupArn: String? = nil, labelGroupName: String? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.faultCodes = faultCodes
            self.labelGroupArn = labelGroupArn
            self.labelGroupName = labelGroupName
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case faultCodes = "FaultCodes"
            case labelGroupArn = "LabelGroupArn"
            case labelGroupName = "LabelGroupName"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeLabelRequest: AWSEncodableShape {
        /// Returns the name of the group containing the label.
        public let labelGroupName: String
        /// Returns the ID of the label.
        public let labelId: String

        public init(labelGroupName: String, labelId: String) {
            self.labelGroupName = labelGroupName
            self.labelId = labelId
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.labelId, name: "labelId", parent: name, max: 32)
            try self.validate(self.labelId, name: "labelId", parent: name, pattern: "^[A-Fa-f0-9]{0,32}$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupName = "LabelGroupName"
            case labelId = "LabelId"
        }
    }

    public struct DescribeLabelResponse: AWSDecodableShape {
        /// The time at which the label was created.
        public let createdAt: Date?
        /// The end time of the requested label.
        public let endTime: Date?
        /// Indicates that a label pertains to a particular piece of equipment.
        public let equipment: String?
        /// Indicates the type of anomaly associated with the label.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let faultCode: String?
        /// The ARN of the requested label group.
        public let labelGroupArn: String?
        /// The name of the requested label group.
        public let labelGroupName: String?
        /// The ID of the requested label.
        public let labelId: String?
        /// Metadata providing additional information about the label. Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let notes: String?
        /// Indicates whether a labeled event represents an anomaly.
        public let rating: LabelRating?
        /// The start time of the requested label.
        public let startTime: Date?

        public init(createdAt: Date? = nil, endTime: Date? = nil, equipment: String? = nil, faultCode: String? = nil, labelGroupArn: String? = nil, labelGroupName: String? = nil, labelId: String? = nil, notes: String? = nil, rating: LabelRating? = nil, startTime: Date? = nil) {
            self.createdAt = createdAt
            self.endTime = endTime
            self.equipment = equipment
            self.faultCode = faultCode
            self.labelGroupArn = labelGroupArn
            self.labelGroupName = labelGroupName
            self.labelId = labelId
            self.notes = notes
            self.rating = rating
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case endTime = "EndTime"
            case equipment = "Equipment"
            case faultCode = "FaultCode"
            case labelGroupArn = "LabelGroupArn"
            case labelGroupName = "LabelGroupName"
            case labelId = "LabelId"
            case notes = "Notes"
            case rating = "Rating"
            case startTime = "StartTime"
        }
    }

    public struct DescribeModelRequest: AWSEncodableShape {
        /// The name of the ML model to be described.
        public let modelName: String

        public init(modelName: String) {
            self.modelName = modelName
        }

        public func validate(name: String) throws {
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case modelName = "ModelName"
        }
    }

    public struct DescribeModelResponse: AWSDecodableShape {
        /// Indicates the time and date at which the ML model was created.
        public let createdAt: Date?
        /// The configuration is the TargetSamplingRate, which is the sampling rate of the data after post processing by Amazon Lookout for Equipment. For example, if you provide data that has been collected at a 1 second level and you want the system to resample the data at a 1 minute rate before training, the TargetSamplingRate is 1 minute. When providing a value for the TargetSamplingRate, you must attach the prefix "PT" to the rate you want. The value for a 1 second rate is therefore PT1S, the value for a 15 minute rate is PT15M, and the value for a 1 hour rate is PT1H
        public let dataPreProcessingConfiguration: DataPreProcessingConfiguration?
        /// The Amazon Resouce Name (ARN) of the dataset used to create the ML model being described.
        public let datasetArn: String?
        /// The name of the dataset being used by the ML being described.
        public let datasetName: String?
        ///  Indicates the time reference in the dataset that was used to end the subset of evaluation data for the ML model.
        public let evaluationDataEndTime: Date?
        ///  Indicates the time reference in the dataset that was used to begin the subset of evaluation data for the ML model.
        public let evaluationDataStartTime: Date?
        /// If the training of the ML model failed, this indicates the reason for that failure.
        public let failedReason: String?
        /// Specifies configuration information about the labels input, including its S3 location.
        public let labelsInputConfiguration: LabelsInputConfiguration?
        /// Indicates the last time the ML model was updated. The type of update is not specified.
        public let lastUpdatedTime: Date?
        /// The Amazon Resource Name (ARN) of the ML model being described.
        public let modelArn: String?
        /// The Model Metrics show an aggregated summary of the model's performance within the evaluation time range. This is the JSON content of the metrics created when evaluating the model.
        public let modelMetrics: String?
        /// The name of the ML model being described.
        public let modelName: String?
        /// Indicates that the asset associated with this sensor has been shut off. As long as this condition is met, Lookout for Equipment will not use data from this asset for training, evaluation, or inference.
        public let offCondition: String?
        ///  The Amazon Resource Name (ARN) of a role with permission to access the data source for the ML model being described.
        public let roleArn: String?
        /// A JSON description of the data that is in each time series dataset, including names, column names, and data types.
        public let schema: String?
        /// Provides the identifier of the KMS key used to encrypt model data by Amazon Lookout for Equipment.
        public let serverSideKmsKeyId: String?
        /// Specifies the current status of the model being described. Status describes the status of the most recent action of the model.
        public let status: ModelStatus?
        ///  Indicates the time reference in the dataset that was used to end the subset of training data for the ML model.
        public let trainingDataEndTime: Date?
        ///  Indicates the time reference in the dataset that was used to begin the subset of training data for the ML model.
        public let trainingDataStartTime: Date?
        /// Indicates the time at which the training of the ML model was completed.
        public let trainingExecutionEndTime: Date?
        /// Indicates the time at which the training of the ML model began.
        public let trainingExecutionStartTime: Date?

        public init(createdAt: Date? = nil, dataPreProcessingConfiguration: DataPreProcessingConfiguration? = nil, datasetArn: String? = nil, datasetName: String? = nil, evaluationDataEndTime: Date? = nil, evaluationDataStartTime: Date? = nil, failedReason: String? = nil, labelsInputConfiguration: LabelsInputConfiguration? = nil, lastUpdatedTime: Date? = nil, modelArn: String? = nil, modelMetrics: String? = nil, modelName: String? = nil, offCondition: String? = nil, roleArn: String? = nil, schema: String? = nil, serverSideKmsKeyId: String? = nil, status: ModelStatus? = nil, trainingDataEndTime: Date? = nil, trainingDataStartTime: Date? = nil, trainingExecutionEndTime: Date? = nil, trainingExecutionStartTime: Date? = nil) {
            self.createdAt = createdAt
            self.dataPreProcessingConfiguration = dataPreProcessingConfiguration
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.evaluationDataEndTime = evaluationDataEndTime
            self.evaluationDataStartTime = evaluationDataStartTime
            self.failedReason = failedReason
            self.labelsInputConfiguration = labelsInputConfiguration
            self.lastUpdatedTime = lastUpdatedTime
            self.modelArn = modelArn
            self.modelMetrics = modelMetrics
            self.modelName = modelName
            self.offCondition = offCondition
            self.roleArn = roleArn
            self.schema = schema
            self.serverSideKmsKeyId = serverSideKmsKeyId
            self.status = status
            self.trainingDataEndTime = trainingDataEndTime
            self.trainingDataStartTime = trainingDataStartTime
            self.trainingExecutionEndTime = trainingExecutionEndTime
            self.trainingExecutionStartTime = trainingExecutionStartTime
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case dataPreProcessingConfiguration = "DataPreProcessingConfiguration"
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case evaluationDataEndTime = "EvaluationDataEndTime"
            case evaluationDataStartTime = "EvaluationDataStartTime"
            case failedReason = "FailedReason"
            case labelsInputConfiguration = "LabelsInputConfiguration"
            case lastUpdatedTime = "LastUpdatedTime"
            case modelArn = "ModelArn"
            case modelMetrics = "ModelMetrics"
            case modelName = "ModelName"
            case offCondition = "OffCondition"
            case roleArn = "RoleArn"
            case schema = "Schema"
            case serverSideKmsKeyId = "ServerSideKmsKeyId"
            case status = "Status"
            case trainingDataEndTime = "TrainingDataEndTime"
            case trainingDataStartTime = "TrainingDataStartTime"
            case trainingExecutionEndTime = "TrainingExecutionEndTime"
            case trainingExecutionStartTime = "TrainingExecutionStartTime"
        }
    }

    public struct DuplicateTimestamps: AWSDecodableShape {
        ///  Indicates the total number of duplicate timestamps.
        public let totalNumberOfDuplicateTimestamps: Int

        public init(totalNumberOfDuplicateTimestamps: Int) {
            self.totalNumberOfDuplicateTimestamps = totalNumberOfDuplicateTimestamps
        }

        private enum CodingKeys: String, CodingKey {
            case totalNumberOfDuplicateTimestamps = "TotalNumberOfDuplicateTimestamps"
        }
    }

    public struct InferenceEventSummary: AWSDecodableShape {
        ///  An array which specifies the names and values of all sensors contributing to an inference event.
        public let diagnostics: String?
        ///  Indicates the size of an inference event in seconds.
        public let eventDurationInSeconds: Int64?
        /// Indicates the ending time of an inference event.
        public let eventEndTime: Date?
        /// Indicates the starting time of an inference event.
        public let eventStartTime: Date?
        ///  The Amazon Resource Name (ARN) of the inference scheduler being used for the inference event.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler being used for the inference events.
        public let inferenceSchedulerName: String?

        public init(diagnostics: String? = nil, eventDurationInSeconds: Int64? = nil, eventEndTime: Date? = nil, eventStartTime: Date? = nil, inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil) {
            self.diagnostics = diagnostics
            self.eventDurationInSeconds = eventDurationInSeconds
            self.eventEndTime = eventEndTime
            self.eventStartTime = eventStartTime
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
        }

        private enum CodingKeys: String, CodingKey {
            case diagnostics = "Diagnostics"
            case eventDurationInSeconds = "EventDurationInSeconds"
            case eventEndTime = "EventEndTime"
            case eventStartTime = "EventStartTime"
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
        }
    }

    public struct InferenceExecutionSummary: AWSDecodableShape {
        ///
        public let customerResultObject: S3Object?
        /// Indicates the time reference in the dataset at which the inference execution stopped.
        public let dataEndTime: Date?
        ///  Specifies configuration information for the input data for the inference scheduler, including delimiter, format, and dataset location.
        public let dataInputConfiguration: InferenceInputConfiguration?
        ///  Specifies configuration information for the output results from for the inference execution, including the output Amazon S3 location.
        public let dataOutputConfiguration: InferenceOutputConfiguration?
        /// Indicates the time reference in the dataset at which the inference execution began.
        public let dataStartTime: Date?
        ///  Specifies the reason for failure when an inference execution has failed.
        public let failedReason: String?
        ///  The Amazon Resource Name (ARN) of the inference scheduler being used for the inference execution.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler being used for the inference execution.
        public let inferenceSchedulerName: String?
        /// The Amazon Resource Name (ARN) of the ML model used for the inference execution.
        public let modelArn: String?
        /// The name of the ML model being used for the inference execution.
        public let modelName: String?
        /// Indicates the start time at which the inference scheduler began the specific inference execution.
        public let scheduledStartTime: Date?
        /// Indicates the status of the inference execution.
        public let status: InferenceExecutionStatus?

        public init(customerResultObject: S3Object? = nil, dataEndTime: Date? = nil, dataInputConfiguration: InferenceInputConfiguration? = nil, dataOutputConfiguration: InferenceOutputConfiguration? = nil, dataStartTime: Date? = nil, failedReason: String? = nil, inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, modelArn: String? = nil, modelName: String? = nil, scheduledStartTime: Date? = nil, status: InferenceExecutionStatus? = nil) {
            self.customerResultObject = customerResultObject
            self.dataEndTime = dataEndTime
            self.dataInputConfiguration = dataInputConfiguration
            self.dataOutputConfiguration = dataOutputConfiguration
            self.dataStartTime = dataStartTime
            self.failedReason = failedReason
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.modelArn = modelArn
            self.modelName = modelName
            self.scheduledStartTime = scheduledStartTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case customerResultObject = "CustomerResultObject"
            case dataEndTime = "DataEndTime"
            case dataInputConfiguration = "DataInputConfiguration"
            case dataOutputConfiguration = "DataOutputConfiguration"
            case dataStartTime = "DataStartTime"
            case failedReason = "FailedReason"
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case scheduledStartTime = "ScheduledStartTime"
            case status = "Status"
        }
    }

    public struct InferenceInputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies configuration information for the input data for the inference, including timestamp format and delimiter.
        public let inferenceInputNameConfiguration: InferenceInputNameConfiguration?
        /// Indicates the difference between your time zone and Coordinated Universal Time (UTC).
        public let inputTimeZoneOffset: String?
        ///  Specifies configuration information for the input data for the inference, including Amazon S3 location of input data.
        public let s3InputConfiguration: InferenceS3InputConfiguration?

        public init(inferenceInputNameConfiguration: InferenceInputNameConfiguration? = nil, inputTimeZoneOffset: String? = nil, s3InputConfiguration: InferenceS3InputConfiguration? = nil) {
            self.inferenceInputNameConfiguration = inferenceInputNameConfiguration
            self.inputTimeZoneOffset = inputTimeZoneOffset
            self.s3InputConfiguration = s3InputConfiguration
        }

        public func validate(name: String) throws {
            try self.inferenceInputNameConfiguration?.validate(name: "\(name).inferenceInputNameConfiguration")
            try self.validate(self.inputTimeZoneOffset, name: "inputTimeZoneOffset", parent: name, pattern: "^(\\+|\\-)[0-9]{2}\\:[0-9]{2}$")
            try self.s3InputConfiguration?.validate(name: "\(name).s3InputConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceInputNameConfiguration = "InferenceInputNameConfiguration"
            case inputTimeZoneOffset = "InputTimeZoneOffset"
            case s3InputConfiguration = "S3InputConfiguration"
        }
    }

    public struct InferenceInputNameConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates the delimiter character used between items in the data.
        public let componentTimestampDelimiter: String?
        /// The format of the timestamp, whether Epoch time, or standard, with or without hyphens (-).
        public let timestampFormat: String?

        public init(componentTimestampDelimiter: String? = nil, timestampFormat: String? = nil) {
            self.componentTimestampDelimiter = componentTimestampDelimiter
            self.timestampFormat = timestampFormat
        }

        public func validate(name: String) throws {
            try self.validate(self.componentTimestampDelimiter, name: "componentTimestampDelimiter", parent: name, max: 1)
            try self.validate(self.componentTimestampDelimiter, name: "componentTimestampDelimiter", parent: name, pattern: "^(\\-|\\_|\\s)?$")
            try self.validate(self.timestampFormat, name: "timestampFormat", parent: name, pattern: "^EPOCH|yyyy-MM-dd-HH-mm-ss|yyyyMMddHHmmss$")
        }

        private enum CodingKeys: String, CodingKey {
            case componentTimestampDelimiter = "ComponentTimestampDelimiter"
            case timestampFormat = "TimestampFormat"
        }
    }

    public struct InferenceOutputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ID number for the AWS KMS key used to encrypt the inference output.
        public let kmsKeyId: String?
        ///  Specifies configuration information for the output results from for the inference, output S3 location.
        public let s3OutputConfiguration: InferenceS3OutputConfiguration

        public init(kmsKeyId: String? = nil, s3OutputConfiguration: InferenceS3OutputConfiguration) {
            self.kmsKeyId = kmsKeyId
            self.s3OutputConfiguration = s3OutputConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, min: 1)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.s3OutputConfiguration.validate(name: "\(name).s3OutputConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3OutputConfiguration = "S3OutputConfiguration"
        }
    }

    public struct InferenceS3InputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The bucket containing the input dataset for the inference.
        public let bucket: String
        /// The prefix for the S3 bucket used for the input data for the inference.
        public let prefix: String?

        public init(bucket: String, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case prefix = "Prefix"
        }
    }

    public struct InferenceS3OutputConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  The bucket containing the output results from the inference
        public let bucket: String
        ///  The prefix for the S3 bucket used for the output results from the inference.
        public let prefix: String?

        public init(bucket: String, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case prefix = "Prefix"
        }
    }

    public struct InferenceSchedulerSummary: AWSDecodableShape {
        /// A period of time (in minutes) by which inference on the data is delayed after the data starts. For instance, if an offset delay time of five minutes was selected, inference will not begin on the data until the first data measurement after the five minute mark. For example, if five minutes is selected, the inference scheduler will wake up at the configured frequency with the additional five minute delay time to check the customer S3 bucket. The customer can upload data at the same frequency and they don't need to stop and restart the scheduler when uploading new data.
        public let dataDelayOffsetInMinutes: Int64?
        /// How often data is uploaded to the source S3 bucket for the input data. This value is the length of time between data uploads. For instance, if you select 5 minutes, Amazon Lookout for Equipment will upload the real-time data to the source bucket once every 5 minutes. This frequency also determines how often Amazon Lookout for Equipment starts a scheduled inference on your data. In this example, it starts once every 5 minutes.
        public let dataUploadFrequency: DataUploadFrequency?
        ///  The Amazon Resource Name (ARN) of the inference scheduler.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler.
        public let inferenceSchedulerName: String?
        /// Indicates whether the latest execution for the inference scheduler was Anomalous (anomalous events found) or Normal (no anomalous events found).
        public let latestInferenceResult: LatestInferenceResult?
        ///  The Amazon Resource Name (ARN) of the ML model used by the inference scheduler.
        public let modelArn: String?
        /// The name of the ML model used for the inference scheduler.
        public let modelName: String?
        /// Indicates the status of the inference scheduler.
        public let status: InferenceSchedulerStatus?

        public init(dataDelayOffsetInMinutes: Int64? = nil, dataUploadFrequency: DataUploadFrequency? = nil, inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, latestInferenceResult: LatestInferenceResult? = nil, modelArn: String? = nil, modelName: String? = nil, status: InferenceSchedulerStatus? = nil) {
            self.dataDelayOffsetInMinutes = dataDelayOffsetInMinutes
            self.dataUploadFrequency = dataUploadFrequency
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.latestInferenceResult = latestInferenceResult
            self.modelArn = modelArn
            self.modelName = modelName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case dataDelayOffsetInMinutes = "DataDelayOffsetInMinutes"
            case dataUploadFrequency = "DataUploadFrequency"
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case latestInferenceResult = "LatestInferenceResult"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case status = "Status"
        }
    }

    public struct IngestedFilesSummary: AWSDecodableShape {
        /// Indicates the number of files that were discarded. A file could be discarded because its format is invalid (for example, a jpg or pdf) or not readable.
        public let discardedFiles: [S3Object]?
        /// Indicates the number of files that were successfully ingested.
        public let ingestedNumberOfFiles: Int
        /// Indicates the total number of files that were submitted for ingestion.
        public let totalNumberOfFiles: Int

        public init(discardedFiles: [S3Object]? = nil, ingestedNumberOfFiles: Int, totalNumberOfFiles: Int) {
            self.discardedFiles = discardedFiles
            self.ingestedNumberOfFiles = ingestedNumberOfFiles
            self.totalNumberOfFiles = totalNumberOfFiles
        }

        private enum CodingKeys: String, CodingKey {
            case discardedFiles = "DiscardedFiles"
            case ingestedNumberOfFiles = "IngestedNumberOfFiles"
            case totalNumberOfFiles = "TotalNumberOfFiles"
        }
    }

    public struct IngestionInputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The location information for the S3 bucket used for input data for the data ingestion.
        public let s3InputConfiguration: IngestionS3InputConfiguration

        public init(s3InputConfiguration: IngestionS3InputConfiguration) {
            self.s3InputConfiguration = s3InputConfiguration
        }

        public func validate(name: String) throws {
            try self.s3InputConfiguration.validate(name: "\(name).s3InputConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case s3InputConfiguration = "S3InputConfiguration"
        }
    }

    public struct IngestionS3InputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the S3 bucket used for the input data for the data ingestion.
        public let bucket: String
        ///  Pattern for matching the Amazon S3 files which will be used for ingestion. If no KeyPattern is provided, we will use the default hierarchy file structure, which is same as KeyPattern {prefix}/{component_name}/*
        public let keyPattern: String?
        /// The prefix for the S3 location being used for the input data for the data ingestion.
        public let prefix: String?

        public init(bucket: String, keyPattern: String? = nil, prefix: String? = nil) {
            self.bucket = bucket
            self.keyPattern = keyPattern
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.keyPattern, name: "keyPattern", parent: name, max: 2048)
            try self.validate(self.keyPattern, name: "keyPattern", parent: name, min: 1)
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case keyPattern = "KeyPattern"
            case prefix = "Prefix"
        }
    }

    public struct InsufficientSensorData: AWSDecodableShape {
        ///  Parameter that describes the total number of sensors that have data completely missing for it.
        public let missingCompleteSensorData: MissingCompleteSensorData
        ///  Parameter that describes the total number of sensors that have a short date range of less than 90 days of data overall.
        public let sensorsWithShortDateRange: SensorsWithShortDateRange

        public init(missingCompleteSensorData: MissingCompleteSensorData, sensorsWithShortDateRange: SensorsWithShortDateRange) {
            self.missingCompleteSensorData = missingCompleteSensorData
            self.sensorsWithShortDateRange = sensorsWithShortDateRange
        }

        private enum CodingKeys: String, CodingKey {
            case missingCompleteSensorData = "MissingCompleteSensorData"
            case sensorsWithShortDateRange = "SensorsWithShortDateRange"
        }
    }

    public struct InvalidSensorData: AWSDecodableShape {
        ///  Indicates the number of sensors that have at least some invalid values.
        public let affectedSensorCount: Int
        ///  Indicates the total number of invalid values across all the sensors.
        public let totalNumberOfInvalidValues: Int

        public init(affectedSensorCount: Int, totalNumberOfInvalidValues: Int) {
            self.affectedSensorCount = affectedSensorCount
            self.totalNumberOfInvalidValues = totalNumberOfInvalidValues
        }

        private enum CodingKeys: String, CodingKey {
            case affectedSensorCount = "AffectedSensorCount"
            case totalNumberOfInvalidValues = "TotalNumberOfInvalidValues"
        }
    }

    public struct LabelGroupSummary: AWSDecodableShape {
        /// The time at which the label group was created.
        public let createdAt: Date?
        /// The ARN of the label group.
        public let labelGroupArn: String?
        /// The name of the label group.
        public let labelGroupName: String?
        /// The time at which the label group was updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, labelGroupArn: String? = nil, labelGroupName: String? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.labelGroupArn = labelGroupArn
            self.labelGroupName = labelGroupName
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case labelGroupArn = "LabelGroupArn"
            case labelGroupName = "LabelGroupName"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct LabelSummary: AWSDecodableShape {
        /// The time at which the label was created.
        public let createdAt: Date?
        /// The timestamp indicating the end of the label.
        public let endTime: Date?
        /// Indicates that a label pertains to a particular piece of equipment.
        public let equipment: String?
        /// Indicates the type of anomaly associated with the label.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let faultCode: String?
        /// The ARN of the label group.
        public let labelGroupArn: String?
        /// The name of the label group.
        public let labelGroupName: String?
        /// The ID of the label.
        public let labelId: String?
        /// Indicates whether a labeled event represents an anomaly.
        public let rating: LabelRating?
        /// The timestamp indicating the start of the label.
        public let startTime: Date?

        public init(createdAt: Date? = nil, endTime: Date? = nil, equipment: String? = nil, faultCode: String? = nil, labelGroupArn: String? = nil, labelGroupName: String? = nil, labelId: String? = nil, rating: LabelRating? = nil, startTime: Date? = nil) {
            self.createdAt = createdAt
            self.endTime = endTime
            self.equipment = equipment
            self.faultCode = faultCode
            self.labelGroupArn = labelGroupArn
            self.labelGroupName = labelGroupName
            self.labelId = labelId
            self.rating = rating
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case endTime = "EndTime"
            case equipment = "Equipment"
            case faultCode = "FaultCode"
            case labelGroupArn = "LabelGroupArn"
            case labelGroupName = "LabelGroupName"
            case labelId = "LabelId"
            case rating = "Rating"
            case startTime = "StartTime"
        }
    }

    public struct LabelsInputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the label group to be used for label data.
        public let labelGroupName: String?
        /// Contains location information for the S3 location being used for label data.
        public let s3InputConfiguration: LabelsS3InputConfiguration?

        public init(labelGroupName: String? = nil, s3InputConfiguration: LabelsS3InputConfiguration? = nil) {
            self.labelGroupName = labelGroupName
            self.s3InputConfiguration = s3InputConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.s3InputConfiguration?.validate(name: "\(name).s3InputConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupName = "LabelGroupName"
            case s3InputConfiguration = "S3InputConfiguration"
        }
    }

    public struct LabelsS3InputConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the S3 bucket holding the label data.
        public let bucket: String
        ///  The prefix for the S3 bucket used for the label data.
        public let prefix: String?

        public init(bucket: String, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^(^$)|([\\u0009\\u000A\\u000D\\u0020-\\u00FF]{1,1023}/$)$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case prefix = "Prefix"
        }
    }

    public struct LargeTimestampGaps: AWSDecodableShape {
        ///  Indicates the size of the largest timestamp gap, in days.
        public let maxTimestampGapInDays: Int?
        ///  Indicates the number of large timestamp gaps, if there are any.
        public let numberOfLargeTimestampGaps: Int?
        ///  Indicates whether there is a potential data issue related to large gaps in timestamps.
        public let status: StatisticalIssueStatus

        public init(maxTimestampGapInDays: Int? = nil, numberOfLargeTimestampGaps: Int? = nil, status: StatisticalIssueStatus) {
            self.maxTimestampGapInDays = maxTimestampGapInDays
            self.numberOfLargeTimestampGaps = numberOfLargeTimestampGaps
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case maxTimestampGapInDays = "MaxTimestampGapInDays"
            case numberOfLargeTimestampGaps = "NumberOfLargeTimestampGaps"
            case status = "Status"
        }
    }

    public struct ListDataIngestionJobsRequest: AWSEncodableShape {
        /// The name of the dataset being used for the data ingestion job.
        public let datasetName: String?
        ///  Specifies the maximum number of data ingestion jobs to list.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of data ingestion jobs.
        public let nextToken: String?
        /// Indicates the status of the data ingestion job.
        public let status: IngestionJobStatus?

        public init(datasetName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, status: IngestionJobStatus? = nil) {
            self.datasetName = datasetName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetName = "DatasetName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListDataIngestionJobsResponse: AWSDecodableShape {
        /// Specifies information about the specific data ingestion job, including dataset name and status.
        public let dataIngestionJobSummaries: [DataIngestionJobSummary]?
        ///  An opaque pagination token indicating where to continue the listing of data ingestion jobs.
        public let nextToken: String?

        public init(dataIngestionJobSummaries: [DataIngestionJobSummary]? = nil, nextToken: String? = nil) {
            self.dataIngestionJobSummaries = dataIngestionJobSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dataIngestionJobSummaries = "DataIngestionJobSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListDatasetsRequest: AWSEncodableShape {
        /// The beginning of the name of the datasets to be listed.
        public let datasetNameBeginsWith: String?
        ///  Specifies the maximum number of datasets to list.
        public let maxResults: Int?
        ///  An opaque pagination token indicating where to continue the listing of datasets.
        public let nextToken: String?

        public init(datasetNameBeginsWith: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.datasetNameBeginsWith = datasetNameBeginsWith
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, max: 200)
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, min: 1)
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetNameBeginsWith = "DatasetNameBeginsWith"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDatasetsResponse: AWSDecodableShape {
        /// Provides information about the specified dataset, including creation time, dataset ARN, and status.
        public let datasetSummaries: [DatasetSummary]?
        ///  An opaque pagination token indicating where to continue the listing of datasets.
        public let nextToken: String?

        public init(datasetSummaries: [DatasetSummary]? = nil, nextToken: String? = nil) {
            self.datasetSummaries = datasetSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case datasetSummaries = "DatasetSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListInferenceEventsRequest: AWSEncodableShape {
        /// The name of the inference scheduler for the inference events listed.
        public let inferenceSchedulerName: String
        /// Returns all the inference events with an end start time equal to or greater than less than the end time given
        public let intervalEndTime: Date
        ///  Lookout for Equipment will return all the inference events with an end time equal to or greater than the start time given.
        public let intervalStartTime: Date
        /// Specifies the maximum number of inference events to list.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of inference events.
        public let nextToken: String?

        public init(inferenceSchedulerName: String, intervalEndTime: Date, intervalStartTime: Date, maxResults: Int? = nil, nextToken: String? = nil) {
            self.inferenceSchedulerName = inferenceSchedulerName
            self.intervalEndTime = intervalEndTime
            self.intervalStartTime = intervalStartTime
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerName = "InferenceSchedulerName"
            case intervalEndTime = "IntervalEndTime"
            case intervalStartTime = "IntervalStartTime"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListInferenceEventsResponse: AWSDecodableShape {
        /// Provides an array of information about the individual inference events returned from the ListInferenceEvents operation, including scheduler used, event start time, event end time, diagnostics, and so on.
        public let inferenceEventSummaries: [InferenceEventSummary]?
        /// An opaque pagination token indicating where to continue the listing of inference executions.
        public let nextToken: String?

        public init(inferenceEventSummaries: [InferenceEventSummary]? = nil, nextToken: String? = nil) {
            self.inferenceEventSummaries = inferenceEventSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceEventSummaries = "InferenceEventSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListInferenceExecutionsRequest: AWSEncodableShape {
        /// The time reference in the inferenced dataset before which Amazon Lookout for Equipment stopped the inference execution.
        public let dataEndTimeBefore: Date?
        /// The time reference in the inferenced dataset after which Amazon Lookout for Equipment started the inference execution.
        public let dataStartTimeAfter: Date?
        /// The name of the inference scheduler for the inference execution listed.
        public let inferenceSchedulerName: String
        /// Specifies the maximum number of inference executions to list.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of inference executions.
        public let nextToken: String?
        /// The status of the inference execution.
        public let status: InferenceExecutionStatus?

        public init(dataEndTimeBefore: Date? = nil, dataStartTimeAfter: Date? = nil, inferenceSchedulerName: String, maxResults: Int? = nil, nextToken: String? = nil, status: InferenceExecutionStatus? = nil) {
            self.dataEndTimeBefore = dataEndTimeBefore
            self.dataStartTimeAfter = dataStartTimeAfter
            self.inferenceSchedulerName = inferenceSchedulerName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataEndTimeBefore = "DataEndTimeBefore"
            case dataStartTimeAfter = "DataStartTimeAfter"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListInferenceExecutionsResponse: AWSDecodableShape {
        /// Provides an array of information about the individual inference executions returned from the ListInferenceExecutions operation, including model used, inference scheduler, data configuration, and so on.
        public let inferenceExecutionSummaries: [InferenceExecutionSummary]?
        ///  An opaque pagination token indicating where to continue the listing of inference executions.
        public let nextToken: String?

        public init(inferenceExecutionSummaries: [InferenceExecutionSummary]? = nil, nextToken: String? = nil) {
            self.inferenceExecutionSummaries = inferenceExecutionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceExecutionSummaries = "InferenceExecutionSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListInferenceSchedulersRequest: AWSEncodableShape {
        /// The beginning of the name of the inference schedulers to be listed.
        public let inferenceSchedulerNameBeginsWith: String?
        ///  Specifies the maximum number of inference schedulers to list.
        public let maxResults: Int?
        /// The name of the ML model used by the inference scheduler to be listed.
        public let modelName: String?
        ///  An opaque pagination token indicating where to continue the listing of inference schedulers.
        public let nextToken: String?
        /// Specifies the current status of the inference schedulers to list.
        public let status: InferenceSchedulerStatus?

        public init(inferenceSchedulerNameBeginsWith: String? = nil, maxResults: Int? = nil, modelName: String? = nil, nextToken: String? = nil, status: InferenceSchedulerStatus? = nil) {
            self.inferenceSchedulerNameBeginsWith = inferenceSchedulerNameBeginsWith
            self.maxResults = maxResults
            self.modelName = modelName
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerNameBeginsWith, name: "inferenceSchedulerNameBeginsWith", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerNameBeginsWith, name: "inferenceSchedulerNameBeginsWith", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerNameBeginsWith, name: "inferenceSchedulerNameBeginsWith", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerNameBeginsWith = "InferenceSchedulerNameBeginsWith"
            case maxResults = "MaxResults"
            case modelName = "ModelName"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListInferenceSchedulersResponse: AWSDecodableShape {
        /// Provides information about the specified inference scheduler, including data upload frequency, model name and ARN, and status.
        public let inferenceSchedulerSummaries: [InferenceSchedulerSummary]?
        ///  An opaque pagination token indicating where to continue the listing of inference schedulers.
        public let nextToken: String?

        public init(inferenceSchedulerSummaries: [InferenceSchedulerSummary]? = nil, nextToken: String? = nil) {
            self.inferenceSchedulerSummaries = inferenceSchedulerSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerSummaries = "InferenceSchedulerSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListLabelGroupsRequest: AWSEncodableShape {
        /// The beginning of the name of the label groups to be listed.
        public let labelGroupNameBeginsWith: String?
        /// Specifies the maximum number of label groups to list.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of label groups.
        public let nextToken: String?

        public init(labelGroupNameBeginsWith: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.labelGroupNameBeginsWith = labelGroupNameBeginsWith
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.labelGroupNameBeginsWith, name: "labelGroupNameBeginsWith", parent: name, max: 200)
            try self.validate(self.labelGroupNameBeginsWith, name: "labelGroupNameBeginsWith", parent: name, min: 1)
            try self.validate(self.labelGroupNameBeginsWith, name: "labelGroupNameBeginsWith", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupNameBeginsWith = "LabelGroupNameBeginsWith"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLabelGroupsResponse: AWSDecodableShape {
        /// A summary of the label groups.
        public let labelGroupSummaries: [LabelGroupSummary]?
        /// An opaque pagination token indicating where to continue the listing of label groups.
        public let nextToken: String?

        public init(labelGroupSummaries: [LabelGroupSummary]? = nil, nextToken: String? = nil) {
            self.labelGroupSummaries = labelGroupSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case labelGroupSummaries = "LabelGroupSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListLabelsRequest: AWSEncodableShape {
        /// Lists the labels that pertain to a particular piece of equipment.
        public let equipment: String?
        /// Returns labels with a particular fault code.
        public let faultCode: String?
        /// Returns all labels with a start time earlier than the end time given.
        public let intervalEndTime: Date?
        /// Returns all the labels with a end time equal to or later than the start time given.
        public let intervalStartTime: Date?
        /// Retruns the name of the label group.
        public let labelGroupName: String
        /// Specifies the maximum number of labels to list.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of label groups.
        public let nextToken: String?

        public init(equipment: String? = nil, faultCode: String? = nil, intervalEndTime: Date? = nil, intervalStartTime: Date? = nil, labelGroupName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.equipment = equipment
            self.faultCode = faultCode
            self.intervalEndTime = intervalEndTime
            self.intervalStartTime = intervalStartTime
            self.labelGroupName = labelGroupName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.equipment, name: "equipment", parent: name, max: 200)
            try self.validate(self.equipment, name: "equipment", parent: name, min: 1)
            try self.validate(self.equipment, name: "equipment", parent: name, pattern: "^[\\P{M}\\p{M}]{1,200}$")
            try self.validate(self.faultCode, name: "faultCode", parent: name, max: 100)
            try self.validate(self.faultCode, name: "faultCode", parent: name, min: 1)
            try self.validate(self.faultCode, name: "faultCode", parent: name, pattern: "^[\\P{M}\\p{M}]{1,100}$")
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case equipment = "Equipment"
            case faultCode = "FaultCode"
            case intervalEndTime = "IntervalEndTime"
            case intervalStartTime = "IntervalStartTime"
            case labelGroupName = "LabelGroupName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLabelsResponse: AWSDecodableShape {
        /// A summary of the items in the label group.
        public let labelSummaries: [LabelSummary]?
        /// An opaque pagination token indicating where to continue the listing of datasets.
        public let nextToken: String?

        public init(labelSummaries: [LabelSummary]? = nil, nextToken: String? = nil) {
            self.labelSummaries = labelSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case labelSummaries = "LabelSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListModelsRequest: AWSEncodableShape {
        /// The beginning of the name of the dataset of the ML models to be listed.
        public let datasetNameBeginsWith: String?
        ///  Specifies the maximum number of ML models to list.
        public let maxResults: Int?
        /// The beginning of the name of the ML models being listed.
        public let modelNameBeginsWith: String?
        ///  An opaque pagination token indicating where to continue the listing of ML models.
        public let nextToken: String?
        /// The status of the ML model.
        public let status: ModelStatus?

        public init(datasetNameBeginsWith: String? = nil, maxResults: Int? = nil, modelNameBeginsWith: String? = nil, nextToken: String? = nil, status: ModelStatus? = nil) {
            self.datasetNameBeginsWith = datasetNameBeginsWith
            self.maxResults = maxResults
            self.modelNameBeginsWith = modelNameBeginsWith
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, max: 200)
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, min: 1)
            try self.validate(self.datasetNameBeginsWith, name: "datasetNameBeginsWith", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.modelNameBeginsWith, name: "modelNameBeginsWith", parent: name, max: 200)
            try self.validate(self.modelNameBeginsWith, name: "modelNameBeginsWith", parent: name, min: 1)
            try self.validate(self.modelNameBeginsWith, name: "modelNameBeginsWith", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetNameBeginsWith = "DatasetNameBeginsWith"
            case maxResults = "MaxResults"
            case modelNameBeginsWith = "ModelNameBeginsWith"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListModelsResponse: AWSDecodableShape {
        /// Provides information on the specified model, including created time, model and dataset ARNs, and status.
        public let modelSummaries: [ModelSummary]?
        ///  An opaque pagination token indicating where to continue the listing of ML models.
        public let nextToken: String?

        public init(modelSummaries: [ModelSummary]? = nil, nextToken: String? = nil) {
            self.modelSummaries = modelSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case modelSummaries = "ModelSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListSensorStatisticsRequest: AWSEncodableShape {
        ///  The name of the dataset associated with the list of Sensor Statistics.
        public let datasetName: String
        ///  The ingestion job id associated with the list of Sensor Statistics. To get sensor statistics for a particular ingestion job id, both dataset name and ingestion job id must be submitted as inputs.
        public let ingestionJobId: String?
        /// Specifies the maximum number of sensors for which to retrieve statistics.
        public let maxResults: Int?
        /// An opaque pagination token indicating where to continue the listing of sensor statistics.
        public let nextToken: String?

        public init(datasetName: String, ingestionJobId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.datasetName = datasetName
            self.ingestionJobId = ingestionJobId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.ingestionJobId, name: "ingestionJobId", parent: name, max: 32)
            try self.validate(self.ingestionJobId, name: "ingestionJobId", parent: name, pattern: "^[A-Fa-f0-9]{0,32}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case datasetName = "DatasetName"
            case ingestionJobId = "IngestionJobId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListSensorStatisticsResponse: AWSDecodableShape {
        /// An opaque pagination token indicating where to continue the listing of sensor statistics.
        public let nextToken: String?
        /// Provides ingestion-based statistics regarding the specified sensor with respect to various validation types, such as whether data exists, the number and percentage of missing values, and the number and percentage of duplicate timestamps.
        public let sensorStatisticsSummaries: [SensorStatisticsSummary]?

        public init(nextToken: String? = nil, sensorStatisticsSummaries: [SensorStatisticsSummary]? = nil) {
            self.nextToken = nextToken
            self.sensorStatisticsSummaries = sensorStatisticsSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sensorStatisticsSummaries = "SensorStatisticsSummaries"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource (such as the dataset or model) that is the focus of the ListTagsForResource operation.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        ///  Any tags associated with the resource.
        public let tags: [Tag]?

        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct MissingCompleteSensorData: AWSDecodableShape {
        ///  Indicates the number of sensors that have data missing completely.
        public let affectedSensorCount: Int

        public init(affectedSensorCount: Int) {
            self.affectedSensorCount = affectedSensorCount
        }

        private enum CodingKeys: String, CodingKey {
            case affectedSensorCount = "AffectedSensorCount"
        }
    }

    public struct MissingSensorData: AWSDecodableShape {
        ///  Indicates the number of sensors that have atleast some data missing.
        public let affectedSensorCount: Int
        ///  Indicates the total number of missing values across all the sensors.
        public let totalNumberOfMissingValues: Int

        public init(affectedSensorCount: Int, totalNumberOfMissingValues: Int) {
            self.affectedSensorCount = affectedSensorCount
            self.totalNumberOfMissingValues = totalNumberOfMissingValues
        }

        private enum CodingKeys: String, CodingKey {
            case affectedSensorCount = "AffectedSensorCount"
            case totalNumberOfMissingValues = "TotalNumberOfMissingValues"
        }
    }

    public struct ModelSummary: AWSDecodableShape {
        /// The time at which the specific model was created.
        public let createdAt: Date?
        ///  The Amazon Resource Name (ARN) of the dataset used to create the model.
        public let datasetArn: String?
        /// The name of the dataset being used for the ML model.
        public let datasetName: String?
        ///  The Amazon Resource Name (ARN) of the ML model.
        public let modelArn: String?
        /// The name of the ML model.
        public let modelName: String?
        /// Indicates the status of the ML model.
        public let status: ModelStatus?

        public init(createdAt: Date? = nil, datasetArn: String? = nil, datasetName: String? = nil, modelArn: String? = nil, modelName: String? = nil, status: ModelStatus? = nil) {
            self.createdAt = createdAt
            self.datasetArn = datasetArn
            self.datasetName = datasetName
            self.modelArn = modelArn
            self.modelName = modelName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case datasetArn = "DatasetArn"
            case datasetName = "DatasetName"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case status = "Status"
        }
    }

    public struct MonotonicValues: AWSDecodableShape {
        ///  Indicates the monotonicity of values. Can be INCREASING, DECREASING, or STATIC.
        public let monotonicity: Monotonicity?
        ///  Indicates whether there is a potential data issue related to having monotonic values.
        public let status: StatisticalIssueStatus

        public init(monotonicity: Monotonicity? = nil, status: StatisticalIssueStatus) {
            self.monotonicity = monotonicity
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case monotonicity = "Monotonicity"
            case status = "Status"
        }
    }

    public struct MultipleOperatingModes: AWSDecodableShape {
        ///  Indicates whether there is a potential data issue related to having multiple operating modes.
        public let status: StatisticalIssueStatus

        public init(status: StatisticalIssueStatus) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
        }
    }

    public struct S3Object: AWSDecodableShape {
        /// The name of the specific S3 bucket.
        public let bucket: String
        /// The AWS Key Management Service (AWS KMS) key being used to encrypt the S3 object. Without this key, data in the bucket is not accessible.
        public let key: String

        public init(bucket: String, key: String) {
            self.bucket = bucket
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct SensorStatisticsSummary: AWSDecodableShape {
        ///  Parameter that describes potential risk about whether data associated with the sensor is categorical.
        public let categoricalValues: CategoricalValues?
        ///  Name of the component to which the particular sensor belongs for which the statistics belong to.
        public let componentName: String?
        ///  Indicates the time reference to indicate the end of valid data associated with the sensor that the statistics belong to.
        public let dataEndTime: Date?
        ///  Parameter that indicates whether data exists for the sensor that the statistics belong to.
        public let dataExists: Bool?
        ///  Indicates the time reference to indicate the beginning of valid data associated with the sensor that the statistics belong to.
        public let dataStartTime: Date?
        ///  Parameter that describes the total number of duplicate timestamp records associated with the sensor that the statistics belong to.
        public let duplicateTimestamps: CountPercent?
        ///  Parameter that describes the total number of invalid date entries associated with the sensor that the statistics belong to.
        public let invalidDateEntries: CountPercent?
        ///  Parameter that describes the total number of, and percentage of, values that are invalid for the sensor that the statistics belong to.
        public let invalidValues: CountPercent?
        ///  Parameter that describes potential risk about whether data associated with the sensor contains one or more large gaps between consecutive timestamps.
        public let largeTimestampGaps: LargeTimestampGaps?
        ///  Parameter that describes the total number of, and percentage of, values that are missing for the sensor that the statistics belong to.
        public let missingValues: CountPercent?
        ///  Parameter that describes potential risk about whether data associated with the sensor is mostly monotonic.
        public let monotonicValues: MonotonicValues?
        ///  Parameter that describes potential risk about whether data associated with the sensor has more than one operating mode.
        public let multipleOperatingModes: MultipleOperatingModes?
        ///  Name of the sensor that the statistics belong to.
        public let sensorName: String?

        public init(categoricalValues: CategoricalValues? = nil, componentName: String? = nil, dataEndTime: Date? = nil, dataExists: Bool? = nil, dataStartTime: Date? = nil, duplicateTimestamps: CountPercent? = nil, invalidDateEntries: CountPercent? = nil, invalidValues: CountPercent? = nil, largeTimestampGaps: LargeTimestampGaps? = nil, missingValues: CountPercent? = nil, monotonicValues: MonotonicValues? = nil, multipleOperatingModes: MultipleOperatingModes? = nil, sensorName: String? = nil) {
            self.categoricalValues = categoricalValues
            self.componentName = componentName
            self.dataEndTime = dataEndTime
            self.dataExists = dataExists
            self.dataStartTime = dataStartTime
            self.duplicateTimestamps = duplicateTimestamps
            self.invalidDateEntries = invalidDateEntries
            self.invalidValues = invalidValues
            self.largeTimestampGaps = largeTimestampGaps
            self.missingValues = missingValues
            self.monotonicValues = monotonicValues
            self.multipleOperatingModes = multipleOperatingModes
            self.sensorName = sensorName
        }

        private enum CodingKeys: String, CodingKey {
            case categoricalValues = "CategoricalValues"
            case componentName = "ComponentName"
            case dataEndTime = "DataEndTime"
            case dataExists = "DataExists"
            case dataStartTime = "DataStartTime"
            case duplicateTimestamps = "DuplicateTimestamps"
            case invalidDateEntries = "InvalidDateEntries"
            case invalidValues = "InvalidValues"
            case largeTimestampGaps = "LargeTimestampGaps"
            case missingValues = "MissingValues"
            case monotonicValues = "MonotonicValues"
            case multipleOperatingModes = "MultipleOperatingModes"
            case sensorName = "SensorName"
        }
    }

    public struct SensorsWithShortDateRange: AWSDecodableShape {
        ///  Indicates the number of sensors that have less than 90 days of data.
        public let affectedSensorCount: Int

        public init(affectedSensorCount: Int) {
            self.affectedSensorCount = affectedSensorCount
        }

        private enum CodingKeys: String, CodingKey {
            case affectedSensorCount = "AffectedSensorCount"
        }
    }

    public struct StartDataIngestionJobRequest: AWSEncodableShape {
        ///  A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
        public let clientToken: String
        /// The name of the dataset being used by the data ingestion job.
        public let datasetName: String
        ///  Specifies information for the input data for the data ingestion job, including dataset S3 location.
        public let ingestionInputConfiguration: IngestionInputConfiguration
        ///  The Amazon Resource Name (ARN) of a role with permission to access the data source for the data ingestion job.
        public let roleArn: String

        public init(clientToken: String = StartDataIngestionJobRequest.idempotencyToken(), datasetName: String, ingestionInputConfiguration: IngestionInputConfiguration, roleArn: String) {
            self.clientToken = clientToken
            self.datasetName = datasetName
            self.ingestionInputConfiguration = ingestionInputConfiguration
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 256)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\p{ASCII}{1,256}$")
            try self.validate(self.datasetName, name: "datasetName", parent: name, max: 200)
            try self.validate(self.datasetName, name: "datasetName", parent: name, min: 1)
            try self.validate(self.datasetName, name: "datasetName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.ingestionInputConfiguration.validate(name: "\(name).ingestionInputConfiguration")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case datasetName = "DatasetName"
            case ingestionInputConfiguration = "IngestionInputConfiguration"
            case roleArn = "RoleArn"
        }
    }

    public struct StartDataIngestionJobResponse: AWSDecodableShape {
        /// Indicates the job ID of the data ingestion job.
        public let jobId: String?
        /// Indicates the status of the StartDataIngestionJob operation.
        public let status: IngestionJobStatus?

        public init(jobId: String? = nil, status: IngestionJobStatus? = nil) {
            self.jobId = jobId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case status = "Status"
        }
    }

    public struct StartInferenceSchedulerRequest: AWSEncodableShape {
        /// The name of the inference scheduler to be started.
        public let inferenceSchedulerName: String

        public init(inferenceSchedulerName: String) {
            self.inferenceSchedulerName = inferenceSchedulerName
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerName = "InferenceSchedulerName"
        }
    }

    public struct StartInferenceSchedulerResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the inference scheduler being started.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler being started.
        public let inferenceSchedulerName: String?
        /// The Amazon Resource Name (ARN) of the ML model being used by the inference scheduler.
        public let modelArn: String?
        /// The name of the ML model being used by the inference scheduler.
        public let modelName: String?
        /// Indicates the status of the inference scheduler.
        public let status: InferenceSchedulerStatus?

        public init(inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, modelArn: String? = nil, modelName: String? = nil, status: InferenceSchedulerStatus? = nil) {
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.modelArn = modelArn
            self.modelName = modelName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case status = "Status"
        }
    }

    public struct StopInferenceSchedulerRequest: AWSEncodableShape {
        /// The name of the inference scheduler to be stopped.
        public let inferenceSchedulerName: String

        public init(inferenceSchedulerName: String) {
            self.inferenceSchedulerName = inferenceSchedulerName
        }

        public func validate(name: String) throws {
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerName = "InferenceSchedulerName"
        }
    }

    public struct StopInferenceSchedulerResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the inference schedule being stopped.
        public let inferenceSchedulerArn: String?
        /// The name of the inference scheduler being stopped.
        public let inferenceSchedulerName: String?
        /// The Amazon Resource Name (ARN) of the ML model used by the inference scheduler being stopped.
        public let modelArn: String?
        /// The name of the ML model used by the inference scheduler being stopped.
        public let modelName: String?
        /// Indicates the status of the inference scheduler.
        public let status: InferenceSchedulerStatus?

        public init(inferenceSchedulerArn: String? = nil, inferenceSchedulerName: String? = nil, modelArn: String? = nil, modelName: String? = nil, status: InferenceSchedulerStatus? = nil) {
            self.inferenceSchedulerArn = inferenceSchedulerArn
            self.inferenceSchedulerName = inferenceSchedulerName
            self.modelArn = modelArn
            self.modelName = modelName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case inferenceSchedulerArn = "InferenceSchedulerArn"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case modelArn = "ModelArn"
            case modelName = "ModelName"
            case status = "Status"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key for the specified tag.
        public let key: String
        /// The value for the specified tag.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\s\\w+-=\\.:/@]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the specific resource to which the tag should be associated.
        public let resourceArn: String
        /// The tag or tags to be associated with a specific resource. Both the tag key and value are specified.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UnsupportedTimestamps: AWSDecodableShape {
        ///  Indicates the total number of unsupported timestamps across the ingested data.
        public let totalNumberOfUnsupportedTimestamps: Int

        public init(totalNumberOfUnsupportedTimestamps: Int) {
            self.totalNumberOfUnsupportedTimestamps = totalNumberOfUnsupportedTimestamps
        }

        private enum CodingKeys: String, CodingKey {
            case totalNumberOfUnsupportedTimestamps = "TotalNumberOfUnsupportedTimestamps"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to which the tag is currently associated.
        public let resourceArn: String
        /// Specifies the key of the tag to be removed from a specified resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateInferenceSchedulerRequest: AWSEncodableShape {
        ///  A period of time (in minutes) by which inference on the data is delayed after the data starts. For instance, if you select an offset delay time of five minutes, inference will not begin on the data until the first data measurement after the five minute mark. For example, if five minutes is selected, the inference scheduler will wake up at the configured frequency with the additional five minute delay time to check the customer S3 bucket. The customer can upload data at the same frequency and they don't need to stop and restart the scheduler when uploading new data.
        public let dataDelayOffsetInMinutes: Int64?
        ///  Specifies information for the input data for the inference scheduler, including delimiter, format, and dataset location.
        public let dataInputConfiguration: InferenceInputConfiguration?
        ///  Specifies information for the output results from the inference scheduler, including the output S3 location.
        public let dataOutputConfiguration: InferenceOutputConfiguration?
        /// How often data is uploaded to the source S3 bucket for the input data. The value chosen is the length of time between data uploads. For instance, if you select 5 minutes, Amazon Lookout for Equipment will upload the real-time data to the source bucket once every 5 minutes. This frequency also determines how often Amazon Lookout for Equipment starts a scheduled inference on your data. In this example, it starts once every 5 minutes.
        public let dataUploadFrequency: DataUploadFrequency?
        /// The name of the inference scheduler to be updated.
        public let inferenceSchedulerName: String
        ///  The Amazon Resource Name (ARN) of a role with permission to access the data source for the inference scheduler.
        public let roleArn: String?

        public init(dataDelayOffsetInMinutes: Int64? = nil, dataInputConfiguration: InferenceInputConfiguration? = nil, dataOutputConfiguration: InferenceOutputConfiguration? = nil, dataUploadFrequency: DataUploadFrequency? = nil, inferenceSchedulerName: String, roleArn: String? = nil) {
            self.dataDelayOffsetInMinutes = dataDelayOffsetInMinutes
            self.dataInputConfiguration = dataInputConfiguration
            self.dataOutputConfiguration = dataOutputConfiguration
            self.dataUploadFrequency = dataUploadFrequency
            self.inferenceSchedulerName = inferenceSchedulerName
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.dataDelayOffsetInMinutes, name: "dataDelayOffsetInMinutes", parent: name, max: 60)
            try self.validate(self.dataDelayOffsetInMinutes, name: "dataDelayOffsetInMinutes", parent: name, min: 0)
            try self.dataInputConfiguration?.validate(name: "\(name).dataInputConfiguration")
            try self.dataOutputConfiguration?.validate(name: "\(name).dataOutputConfiguration")
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, max: 200)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, min: 1)
            try self.validate(self.inferenceSchedulerName, name: "inferenceSchedulerName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataDelayOffsetInMinutes = "DataDelayOffsetInMinutes"
            case dataInputConfiguration = "DataInputConfiguration"
            case dataOutputConfiguration = "DataOutputConfiguration"
            case dataUploadFrequency = "DataUploadFrequency"
            case inferenceSchedulerName = "InferenceSchedulerName"
            case roleArn = "RoleArn"
        }
    }

    public struct UpdateLabelGroupRequest: AWSEncodableShape {
        /// Updates the code indicating the type of anomaly associated with the label.
        ///  Data in this field will be retained for service usage. Follow best practices for the security of your data.
        public let faultCodes: [String]?
        /// The name of the label group to be updated.
        public let labelGroupName: String

        public init(faultCodes: [String]? = nil, labelGroupName: String) {
            self.faultCodes = faultCodes
            self.labelGroupName = labelGroupName
        }

        public func validate(name: String) throws {
            try self.faultCodes?.forEach {
                try validate($0, name: "faultCodes[]", parent: name, max: 100)
                try validate($0, name: "faultCodes[]", parent: name, min: 1)
                try validate($0, name: "faultCodes[]", parent: name, pattern: "^[\\P{M}\\p{M}]{1,100}$")
            }
            try self.validate(self.faultCodes, name: "faultCodes", parent: name, max: 50)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, max: 200)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, min: 1)
            try self.validate(self.labelGroupName, name: "labelGroupName", parent: name, pattern: "^[0-9a-zA-Z_-]{1,200}$")
        }

        private enum CodingKeys: String, CodingKey {
            case faultCodes = "FaultCodes"
            case labelGroupName = "LabelGroupName"
        }
    }
}

// MARK: - Errors

/// Error enum for LookoutEquipment
public struct LookoutEquipmentErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize LookoutEquipment
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The request could not be completed because you do not have access to the resource.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    ///  The request could not be completed due to a conflict with the current state of the target resource.
    public static var conflictException: Self { .init(.conflictException) }
    ///  Processing of the request has failed because of an unknown error, exception or failure.
    public static var internalServerException: Self { .init(.internalServerException) }
    ///  The resource requested could not be found. Verify the resource ID and retry your request.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    ///  Resource limitations have been exceeded.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The request was denied due to request throttling.
    public static var throttlingException: Self { .init(.throttlingException) }
    ///  The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related AWS service that&#39;s being utilized.
    public static var validationException: Self { .init(.validationException) }
}

extension LookoutEquipmentErrorType: Equatable {
    public static func == (lhs: LookoutEquipmentErrorType, rhs: LookoutEquipmentErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension LookoutEquipmentErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
